{include file="header.html"}

<div class="page-header">
	<h6>
		充值管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			充值明细
		</small>
		<div style="text-align:right">
			<a href="?app=recharge&act=export&where={$where}" target="_blank">导出到EXCEL</a>
		</div>
	</h6>
</div><!-- /.page-header -->

<form class="form-inline" action="?" method="get" style="padding-bottom:5px;">
<input type="hidden" name="app" id="app" value="recharge" />
<input type="hidden" name="act" id="act" value="history" /> 
<input type="text" class="input-medium" placeholder="关键词" name="keyword" value="{$keyword}" /> 
<input type="text" class="form-control" name="begin_date" id="begin_date" placeholder="开始日期" value="{$begin_date}" initdate="" style="width:100px;" />
 -
<input type="text" class="form-control" name="end_date" id="end_date" placeholder="结束日期" value="{$end_date}" initdate="" style="width:100px;" />
<select name="status" id="status" class="form-control">
	<option value="">状态</option>
	<option value="0" {if $status==='0'}selected{/if}>未支付</option>
	<option value="1" {if $status==='1'}selected{/if}>已支付</option>
</select> 

<button type="submit" class="btn btn-info btn-sm">
	<i class="ace-icon fa fa-search bigger-110"></i>搜索
</button>
<button type="button" class="btn btn-sm" onclick="javascript:self.location='?app=recharge&act=history'">
	<i class="ace-icon fa fa-undo bigger-110"></i>复位
</button>
</form>

<table id="simple-table" class="table table-striped table-bordered table-hover">
	<thead>
		<tr>
			<th>ID</th>
			<th>订单号</th>
			<th>会员</th>
			<th>充值金额</th>
			<th>充值后金额</th>
			<th>赠送</th>
			<th>支付方式</th>
			<th>下单时间</th>
			<th>支付时间</th>
			<th>状态</th>
		</tr>
	</thead>

	<tbody>
		{foreach from=$rs item=row name=row}
		<tr>
			<td>{$row.id}</td>
			<td style="text-align:left;">{$row.order_sn}</td>
			<td style="text-align:left;"><a href="?app=member&act=edit&member_id={$row.member_id}">{$row.member_name}({$row.mobile})</a></td>
			<td style="text-align:left;">{$row.recharged_money}</td>
			<td style="text-align:left;">{$row.price}</td>
			<td style="text-align:left;">{$row.bonus}</td>
			<td style="text-align:left;">{$row.pay_method}</td>
			<td style="text-align:left;">{$row.add_time|date_format:"%Y-%m-%d %H:%I:%S"}</td>
			<td style="text-align:left;">{if $row.paid_time >0}{$row.paid_time|date_format:"%Y-%m-%d %H:%I:%S"}{/if}</td>
			<td style="text-align:left;">{if $row.status == 0}未支付{else}已支付{/if}</td>
		</tr>
		{foreachelse}
		<tr bgcolor="white"><td colspan="13" height="50">暂无记录</td></tr>
		{/foreach}	
		
	</tbody>
</table>
	<div class="mypage" style="text-align:right">
			共 {$page.num_records} 个记录  {$page.current_page} / {$page.num_pages} 页  {$page.first_page} {$page.prev} {$page.nav} {$page.next} {$page.last_page}
	</div>
{include file="footer.html"}

<script>
$(function(){
	$('#begin_date').datepicker({
		useStyle:'datepicker2',
		readonly:false,
		showTime:false,
		showSecond:false,
		format:'yyyy-mm-dd'
	});
	$('#end_date').datepicker({
		useStyle:'datepicker2',
		readonly:false,
		showTime:false,
		showSecond:false,
		format:'yyyy-mm-dd'
	});
});
</script>
